<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Page Title</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- <link rel="stylesheet" type="text/css" media="screen" href="main.css" /> -->

  <script src="https://unpkg.com/vue@2.5.13/dist/vue.js"></script>
  <script src="https://unpkg.com/vuex@3.0.1/dist/vuex.js"></script>
  <script src="https://unpkg.com/vue-router@3.0.1/dist/vue-router.js"></script>

  <template  id="id1">
    <div>
      aaa12
    </div>
  </template>

  <script >



  function load() {
    Vue.component('my-div',{template:'#id1'})
    var v = new Vue({
      el : '#app',
      template:'<div><my-div></my-div></div>'//,
      // components : {
      //   'my1' : '#id1'
      // }

    })
    //添加

  }

  </script>
</head>
<body onload="load()">
  <div id="app"></div>
</body>
</html>
